from urllib.parse import urlencode

if __name__ == '__main__':
    base_url = "https://www.baidu.com/s?"

    keyword = {
        "wd" : "陕西交通职业技术学院"
    }

    # https://www.baidu.com/s?wd=%E9%99%95%E8%A5%BF%E4%BA%A4%E9%80%9A%E8%81%8C%E4%B8%9A%E6%8A%80%E6%9C%AF%E5%AD%A6%E9%99%A2
    code = urlencode(query=keyword)
    print(code)
    url = base_url +code
    print(url)
    
